<?php
namespace app\common\validate\Business;

use think\Validate;
// 用户收货地址的验证器
class Address extends Validate
{
    /**
     * 验证规则
     * require 属于必填， unique：表示当前唯一的值
     */
    protected $rule = [
        'busid' => 'require',
        'consignee' => 'require',
        'province' => 'require',
        'city' => 'require',
        'district' => 'require',
        'address' => 'require',
        'mobile' => 'require',
    ];

    // 提示消息
    protected $message  =   [
        'busid.require' => '用户ID必须填写',
        'consignee.require'     => '收件人必须填写',
        'province.require'   => '省份必须填写',
        'city.require'  => '城市必须填写',
        'district.require'     => '区域必须填写',
        'address.require'   => '详细地址必须填写',
        'mobile.require'  => '手机号码必须填写',
    ];
}   
?>